#pragma once
#include "win_event_lock.h"
#include "mutex.h"

namespace el
{
	class TcpConnect;

	class TcpClientTest
	{
	public:
		TcpClientTest();
		~TcpClientTest();

		bool test();

	private:
		void wait(int n);
		void onConnectInServer(TcpConnect* connect);
		void onMassageInServer(TcpConnect* connect);

		void onConnectInClient(TcpConnect* connect);
		void onMassageInClient(TcpConnect* connect);
		void onCloseInClient(TcpConnect* connect);

	private:
		TcpConnect * connect_;
		WinEventLock event_lock_;
		Mutex mutex_;
		int count_;
	};


}

